package com.itxiuyixiu.homework.entity.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.itxiuyixiu.homework.entity.enums.AcademyName;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 学院
 *
 * @author 黄磊
 * @date 2020/3/5
 */
@Entity
@Table(indexes = @Index(name = "index_academyName", columnList = "academyName"))
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class Academy {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 学院名称
     */
    @Column(unique = true, nullable = false)
    private String academyName;

    private LocalDateTime gmtCreated;

    private LocalDateTime gmtModified;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAcademyName() {
        return academyName;
    }

    public void setAcademyName(String academyName) {
        this.academyName = academyName;
    }

    public LocalDateTime getGmtCreated() {
        return gmtCreated;
    }

    public void setGmtCreated(LocalDateTime gmtCreated) {
        this.gmtCreated = gmtCreated;
    }

    public LocalDateTime getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(LocalDateTime gmtModified) {
        this.gmtModified = gmtModified;
    }
}
